<%@ page language=
"java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh-CN">
<head>
<%@ include file="/include/include.jsp" %>

</head>

<body>
	
	<%@ include file="/include/header.jsp" %>

	<%@ include file="/include/menu.jsp" %>
	
	<script>
		function exportPurchase(){
			if(!isSelected('idss')){
				alert('您必须选择一行！');
				return;
			}
			
			$('ids').value=getValuesByTagName('idss');
			$('form').action ='${ctx}/purchase/purchaselist/exportpurchase';
			$('form').submit();
			
		}

		function deletePurchase(id){
			if (!isSelected('idss')){
				alert("您必须选择一行!");
				return;
			}

			if (window.confirm("您确认要删除您所选择的订单信息？订单信息一旦被删除则不能够恢复")) {
				$('ids').value = getValuesByTagName('idss');
				$('form').action = "${ctx}/purchase/purchaselist/deletes";
				$('currPageId').value = document.getElementsByName('page.currentPage')[0].value;
				$('form').submit();
			}
		}

		function deletePurchaseOrder(id){
			if (window.confirm("您确认要删除您所选择的订单信息？订单信息一旦被删除则不能够恢复")) {
				$('form').action = "${ctx}/purchase/purchaselist/delete/" + id;
				$('currPageId').value = document.getElementsByName('page.currentPage')[0].value;
				$('form').submit();
			}
		}
		function deletePurchaseOrder2(id){
			if (window.confirm("是否置为完成状态?")) {
				$('form').action = "${ctx}/purchase/purchaselist/finish/"+id;
				$('currPageId').value = document.getElementsByName('page.currentPage')[0].value;
				$('form').submit();
			}
		}
</script>
	<form id='form'  method="post">
		<input type="hidden" name="ids" id='ids' />
		<input  type = "hidden" id = "currPageId" name = "currPageId" />
	</form>
	<div id="mainContent">
		<h2><a href="${ctx}/${menu.url}">${menu.description}</a>&nbsp;-&nbsp;<a href="${ctx}/${empty currViewBarSubMenu_ ? submenu.url : currViewBarSubMenu_.url}">${empty currViewBarSubMenu_ ? submenu.description : currViewBarSubMenu_.description}</a></h2>
		
	<div class="tool-bar">
			 <div  href="${ctx}/purchase/scope/add" class="modal-window modal-link">新增</div>  
		</div>
		<div id="ajax2">
		</div>
		<c:if test="${not empty infoMessage}">
			<div class="info">
				<span>		
					${infoMessage}
				</span>
			</div>
		</c:if>	
		<div class="grid-list">
			<table class="grid" cellspacing="0" url="${ctx}/purchase/socpe/list">
				<thead>
					<tr>
						<!--<td><input type="checkbox" name="aaa" onclick="clearAll(this,'idss')"/></td>  -->
						<td orderBy_="purchaseorder.orderNumber" class="${orderParameters['purchaseorder.orderNumber']}">名称</td>
						<td orderBy_="purchaseorder.maintenanceStation.number" class="${orderParameters['purchaseorder.maintenanceStation.number']}">有效范围</td>		
						<td>操作</td>						
						<!--<td>百分比</td>
					--></tr>
				</thead>
				<tbody>
					<c:forEach var="scope" items="${scopes}">
						<tr >			
							<!-- <td><input type="checkbox" name="idss"  value="${po.id}"/></td> -->
							<td>${scope.scopename}</td>
							<td>${scope.scopedistance}</td>
							<td class="tool-bar-tr">
								<a href="javascript:doDelteNormalValidate('您确实要删除该记录吗？删除后将不能恢复,请确认!','对不起，该对象与其他业务对象有关联关系，不能删除!','Userinfo','id',${map.uinfo.id},'${ctx}/system/userinfo/list')">
									<img border="0" src="${ctx}/static/images/delete.png"   alt="删除业务对象" />
								</a>
								<div title="${menu.description} - ${empty currViewBarSubMenu_ ? submenu.description : currViewBarSubMenu_.description} - 修改${empty currViewBarSubMenu_ ? submenu.description : currViewBarSubMenu_.description}"  href="${ctx}/system/userinfo/${map.uinfo.id}/edit" class="modal-window modal-link">修改用户</div>
							</td>
                        </tr>
					</c:forEach>
				</tbody>
			</table>
			<t:page action="${ctx}/purchase/scope/list" />
		</div>
	</div>
	<%@ include file="/include/script.jsp" %>
	
</body>

</html> 